<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<title>API: tabview   Lang.js  (YUI Library)</title>
	<link rel="stylesheet" type="text/css" href="assets/reset-fonts-grids-min.css">
	<link rel="stylesheet" type="text/css" href="assets/api.css">
</head>

<body id="yahoo-com">
<div id="doc3" class="yui-t2">

	<div id="hd">
        <h1>Yahoo! UI Library</h1>
        <h3>tabview&nbsp;</h3>
        <p>
        <a href="./index.html">Yahoo! UI Library</a> 
            &gt; <a href="./module_tabview.html">tabview</a>
                
                 &gt; Lang.js (source view) 
            </p>
	</div>

	<div id="bd">
		<div id="yui-main">
			<div class="yui-b">

                    <div id="srcout">
<div class="highlight" ><pre><span class="o">(</span><span class="k">function</span><span class="o">()</span> <span class="o">{</span>
    
    <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">Lang</span> <span class="o">=</span> <span class="o">{</span>
        <span class="nx">isArray</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span> <span class="c">// frames lose type, so test constructor string</span>
<span class="c"></span>            <span class="k">if</span> <span class="o">(</span><span class="nx">val</span><span class="o">.</span><span class="nx">constructor</span> <span class="o">&amp;&amp;</span> <span class="nx">val</span><span class="o">.</span><span class="nx">constructor</span><span class="o">.</span><span class="nx">toString</span><span class="o">().</span><span class="nx">indexOf</span><span class="o">(</span><span class="s1">&#39;Array&#39;</span><span class="o">)</span> <span class="o">&gt;</span> <span class="o">-</span><span class="m">1</span><span class="o">)</span> <span class="o">{</span>
                <span class="k">return</span> <span class="kc">true</span><span class="o">;</span>
            <span class="o">}</span> <span class="k">else</span> <span class="o">{</span>
                <span class="k">return</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isObject</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">&amp;&amp;</span> <span class="nx">val</span><span class="o">.</span><span class="nx">constructor</span> <span class="o">==</span> <span class="nb">Array</span><span class="o">;</span>
            <span class="o">}</span>
        <span class="o">},</span>
        
        <span class="nx">isBoolean</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="k">typeof</span> <span class="nx">val</span> <span class="o">==</span> <span class="s1">&#39;boolean&#39;</span><span class="o">;</span>
        <span class="o">},</span>
    
        <span class="nx">isFunction</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="k">typeof</span> <span class="nx">val</span> <span class="o">==</span> <span class="s1">&#39;function&#39;</span><span class="o">;</span>
        <span class="o">},</span>
        
        <span class="nx">isNull</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="nx">val</span> <span class="o">===</span> <span class="kc">null</span><span class="o">;</span>
        <span class="o">},</span>
        
        <span class="nx">isNumber</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="o">!</span><span class="nb">isNaN</span><span class="o">(</span><span class="nx">val</span><span class="o">);</span>
        <span class="o">},</span>
        
        <span class="nx">isObject</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="k">typeof</span> <span class="nx">val</span> <span class="o">==</span> <span class="s1">&#39;object&#39;</span> <span class="o">||</span> <span class="nx">YAHOO</span><span class="o">.</span><span class="nx">util</span><span class="o">.</span><span class="nx">Lang</span><span class="o">.</span><span class="nx">isFunction</span><span class="o">(</span><span class="nx">val</span><span class="o">);</span>
        <span class="o">},</span>
        
        <span class="nx">isString</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="k">typeof</span> <span class="nx">val</span> <span class="o">==</span> <span class="s1">&#39;string&#39;</span><span class="o">;</span>
        <span class="o">},</span>
        
        <span class="nx">isUndefined</span><span class="o">:</span> <span class="k">function</span><span class="o">(</span><span class="nx">val</span><span class="o">)</span> <span class="o">{</span>
            <span class="k">return</span> <span class="k">typeof</span> <span class="nx">val</span> <span class="o">==</span> <span class="s1">&#39;undefined&#39;</span><span class="o">;</span>
        <span class="o">}</span>
    <span class="o">};</span>
<span class="o">})();</span>
</pre></div>
                    </div>
			</div>
		</div>
		<div class="yui-b">
            <div class="nav">

                    <div class="module">
                        <h4>Modules</h4>
                        <ul class="content">
                                <li><a href="module_animation.html">animation</a></li>
                                <li><a href="module_autocomplete.html">autocomplete</a></li>
                                <li><a href="module_calendar.html">calendar</a></li>
                                <li><a href="module_connection.html">connection</a></li>
                                <li><a href="module_container.html">container</a></li>
                                <li><a href="module_dom.html">dom</a></li>
                                <li><a href="module_dragdrop.html">dragdrop</a></li>
                                <li><a href="module_event.html">event</a></li>
                                <li><a href="module_logger.html">logger</a></li>
                                <li><a href="module_menu.html">menu</a></li>
                                <li><a href="module_slider.html">slider</a></li>
                                <li><a href="module_tabview.html">tabview</a></li>
                                <li><a href="module_treeview.html">treeview</a></li>
                                <li><a href="module_yahoo.html">yahoo</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Classes</h4>
                        <ul class="content">
                                <li><a href="YAHOO.util.Attribute.html">YAHOO.util.Attribute</a></li>
                                <li><a href="YAHOO.util.AttributeProvider.html">YAHOO.util.AttributeProvider</a></li>
                                <li><a href="YAHOO.util.Element.html">YAHOO.util.Element</a></li>
                                <li><a href="YAHOO.widget.Tab.html">YAHOO.widget.Tab</a></li>
                                <li><a href="YAHOO.widget.TabView.html">YAHOO.widget.TabView</a></li>
                        </ul>
                    </div>

                    <div class="module">
                        <h4>Files</h4>
                        <ul class="content">        
                                <li><a href="Attribute.js.html">Attribute.js</a></li>
                                <li><a href="AttributeProvider.js.html">AttributeProvider.js</a></li>
                                <li><a href="Element.js.html">Element.js</a></li>
                                <li><a href="Lang.js.html">Lang.js</a></li>
                                <li><a href="Tab.js.html">Tab.js</a></li>
                                <li><a href="TabView.js.html">TabView.js</a></li>
                        </ul>
                    </div>





            </div>
		</div>
	</div>
	<div id="ft">
        <hr />
        Copyright &copy; 2006 Yahoo! Inc. All rights reserved.
	</div>
</div>
</body>
</html>
